<template>
	<view class="box u-flex u-flex-column u-flex-items-center">
		<image class="logo" src="https://img0.baidu.com/it/u=3475821871,1474054977&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1708534800&t=24033c77d013f30065864cf94644cc30" mode="aspectFit"></image>
		<view class="tips">需要您的授权，以使用汇禾生活小程序全部功能</view>
		<view class="loginBtn u-margin-bottom-auto">
			<u-button open-type="getUserInfo" @getuserinfo="getuserinfo" type="warning " :ripple="true" ripple-bg-color="#909399">微信用户一键登录</u-button>
			<u-button open-type="getPhoneNumber" type="primary" class="bottom" @getphonenumber="getPhoneNumbers">绑定手机号</u-button>
			<u-checkbox-group>
				<u-checkbox shape="circle" size="14"></u-checkbox>
				<u--text text="我同意" type="info" size="12"></u--text>
			</u-checkbox-group>
		</view>
	</view>
</template>

<script setup lang="ts">
import { getPhoneNumber, getUserInfo } from '@/utils';
const getuserinfo = (e: any) => {
	getUserInfo(e)?.then((res) => {
		console.log('res', res);
	});
};

const getPhoneNumbers = (e: any) => {
	getPhoneNumber(e.detail)?.then((res) => {
		console.log('getPhoneNumber', res);
	});
};
</script>

<style lang="scss" scoped>
@import 'login.scss';
</style>
